Buttons, buttons, everywhere!

back to section start!
Buttons are king in DOpus-land. They're everywhere! You can see them in name mode lister windows, they are in banks, and start menus - you can even have free-standing buttons as commands so that they don't need to be part of a structured group. You can have picture buttons, you can have text buttons - you can even have buttons that only appear when you need 'em. So do they need a lot of explaining? Not really, since buttons in DOpus all use pretty much the same configuration editor, and once you've got to grips with that, there's no reason why you can't apply your knowledge over and over again.
If you'd like to open a new lister containing a directory that's in your current lister (to copy files into it, say) then just hold down the SHIFT key and double click on it.



Button types

Although all buttons are created equal in DOpus (you can load your button banks as buttons, toolbars or even Start menus), and the means of creating them is the same, there are important differences that mean that sometimes one button type is more suitable for use than another. Herewith the options:

  • Button Bank

    This is your default style of button, just like the ones in DOpus 4, only better. In DOpus 5's past, you could have multiple functions for a button (more than the usual LMB, MMB, RMB), but it was awkward to get at them. You had to hold your LMB down over a button, wait for a popup of all defined actions to appear, let go of your mouse button, the button in question now becomes the entry you selected and you can click on it with the LMB as usual. These days, button banks behave in the same manner as Start menus in that you can define several functions and use them all by selecting them from a popup menu that appears when you hold down the LMB on the button.

  • Start Menus

    Start menus have been in DOpus since the first release of Magellan and, although they remind people of Windows, are very useful for when you want to have a button bank which isn't obtrusive - ideal for things like buttons to open specific directories, or run programs which aren't in constant use. However, thanks to the fact that they can have two levels of sub-menu, they are far superior to normal user menus. If you think you might need the added depth that a Start menu gives you, make sure you don't spend your whole time configuring a user menu only to realise too late that what you actually wanted was a Start menu. You can always use drag and drop to move entries from one to the other, but it's best to get this kind of thing right when you first do it! An example of a start menu would be one that replaced all the drive icons on your Workbench. Instead of  having loads of valuable screen real estate now used up by icons you might only click on once in a blue moon, a start menu looks nice and provides the same amount of usability in a fraction of the space.

  • Toolbars

    Bit of a specialised example of a button bank this one. By default you're likely to only have one toolbar that gets used for all name mode and icon action mode listers, but this doesn't have to be the case. There's no reason why you can't have as many unique toolbars as you like for specific listers - you won't need picture viewer tools in a toolbar in a directory that exclusively contains text, for example. However, configuring each individual directory's toolbar is probably a waste of time for two reasons - 1. Inheritance means that you'll probably go into or out of a directory and get stuck with a toolbar that's inappropriate; 2. All those toolbars can eat into your hard disk rapidly and can be quite confusing when house keeping.

  • Command buttons

    Directory Opus has tons of internal commands, but you, as the user, can define commands of your own which act just like DOpus' internal ones. The easiest way to explain this great feature is (like so many other things) through an example or two.

    Let's suppose that you (like myself) have the same function defined in several places; for example, you may have an image viewer (in this case CyberView) defined in a pull down menu, a toolbar button, and a filetype, all of which execute the following function:

    Work:Graphics/CyberView/CyberView CENTER WIDTH=800 HEIGHT=600 CORRUPT {F!}

    Well, if you wanted to change (let's say) the resolution to WIDTH=1024 HEIGHT=768, then you would have to do that for all locations of the function (plus you may not even forget one).

    So, the easiest way to manage multiple occurrences of the same function is to define a command for it.

    Let's look at how to make a command which makes Multiview open an image on its own screen. First, we need to get into the function editor, so we'll simply select New ยป Graphics Buttons... from the Buttons Menu. Double-click on the new button to open the button editor. Next, double-click on "Left" under "Functions" in the button editor; this will reveal the function editor.

    Once you have the function editor open, select "Add" and enter the following text:

    SYS:Utilities/Multiview SCREEN {F}

    Change the function type to AmigaDOS (by default it will be set to Workbench). Now from the Edit pull-down menu (which you may not have known was there ;-) select "Export As Command File..." (shortcut: f). Enter the name for your command - something like "Multiview". The command is then saved into DOpus5:Commands/ - go see!

    Now, go back to the function editor (which should still be open) and select Delete to delete this function we entered (as it is now saved as a command anyway). Click "Add" (and leave the type as Command), and then click on the Command List button (which looks like a file folder - to the right of the command-type cycle-menu). In the list you should see your command! But wait, it has no definition like all the other commands.

    Open a lister which contains the path DOpus5:Commands/ and hold down the right mouse button over your command. Select "Edit Command..." from the pop-up menu. Without changing anything, select save. A DOpus requestor will open: turn off "Leave out on desktop" and enter a description into the text field. Once you hit OK, your command will have a description.

    By the way, you may now discard the graphic button we created at the beginning, since it was only used to get at the function editor.

    You can also add/change the command description by editing the command file's comment field using the internal Comment command. Or, if you have the command field enabled in name mode listers, you can use in-line editing to add/change the command description as well!


    Another great example of a user-defined command one used to play random samples. You can then add it to each button on a button bank so that when you click on the buttons they play a random sound.

    Using PickFile and DSound (both available on Aminet), I have set up a command called RandSample which looks like:

    AmigaDOS PickFile F=Samples:MiscSamples.list Q C=C:Run C:DSound -2 -w Samples:Misc/[].snd

    This line simply tells PickFile to look select a sample from MiscSamples.List and play it using DSound (read the programs' respective documentation for further details).

    Now you can set up a button which might look like this:

    Command RandSample
    Command SmartRead

    Which would launch DOpus' internal SmartRead after playing a cool sound...



Editing your button banks shortcut: 3

Although you can click on a button bank and then select the shortcut for editing it, or the menu item, it's actually much easier to hold down the ALT key as you click on the button you wish to edit (Start menus use the Menu editor, so they're a bit different). Either way will open the button bank editor.



Pick a chapter:

DOpus PLUS - giving you that bit extra...